﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace VerticalShooterRPG
{
    class SpinningEnemy: BasicModel
    {
        Matrix rotation = Matrix.Identity;
        Matrix position = Matrix.Identity;

        public SpinningEnemy(Model m) : base(m)
        {

        }

        public override void Update()
        {
            rotation *= Matrix.CreateRotationY(MathHelper.PiOver4 / 180);
            rotation *= Matrix.CreateRotationZ(MathHelper.PiOver4 / 180);

            position *= Matrix.CreateTranslation(0, -.55f, 0);
        }

        public override Matrix GetWorld()
        {
            return world * rotation * position;
        }
    }
}
